[LINUX] Avoid triggering the softlockup BUG when offline for too long.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 29 Nov 2006 12:16:59 +0000 (12:16 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 29 Nov 2006 12:16:59 +0000 (12:16 +0000)
After being offline for a long time, the softlockup  watchdog triggers
a BUG() on our faces. This is expected, as in fact, we spent more than
a fixed 10*HZ amount of time without touching the watchdog.

However, by inspecting the contents of stolen inside timer irq handler,
we can gain awareness of the fact, and do better than that.

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c

index 05f3c47e500e945db638e7b62d1ddab2af674c49..93388ea67a56c58695da4839be0f8d709ea7c594 100644 (file)
@@ -710,6 +710,10 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                                            (cputime_t)delta_cpu);
        }
 
+       /* Offlined for more than a few seconds? Avoid lockup warnings. */
+       if (stolen > 5*HZ)
+               touch_softlockup_watchdog();
+
        /* Local timer processing (see update_process_times()). */
        run_local_timers();
        if (rcu_pending(cpu))